<%@ page language="java" pageEncoding="UTF-8"
	errorPage="../../defaultException.jsp"%>
<%@include file="../../tags.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> -->
<title>添加目的地</title>
<%@include file="../../head.jsp"%>
</head>
<body>
	<form id="fm" method="post" enctype="multipart/form-data">
		<table style="width: 600px; height: 200px;">

			<tr>
				<td><label>目的地中文名：</label>
				</td>
				<td><input name="zhname"
					data-options="required:true,validType:'length[0,32]'"
					class="easyui-validatebox">
				</td>
				<td><label>目的地英文名：</label>
				</td>
				<td><input name="enname"
					data-options="required:true,validType:'length[0,32]'"
					class="easyui-validatebox">
				</td>
			</tr>
			<tr class="fitem">
				<td><label>归属的国家Id:</label>
				</td>
				<td><input id="countryId" name="countryId" required="true" />
				</td>
				
				<td>版权：</td>
				<td><input name="copyright"
					data-options="validType:'length[0,64]'" class="easyui-validatebox">
				</td>
			</tr>
			<tr class="fitem">
				<td><label>海拔高度:</label></td>
				<td><input name="altitude"
					data-options="required:false,validType:'length[0,32]'"
					class="easyui-validatebox"></td>
				<td><label>人口数量:</label></td>
				<td><input name="peopleNum" class="easyui-numberbox"
					data-options="min:0,max:2147483646"><label>万</label></td>
			</tr>
			<tr class="fitem">
				<td><label>使用语言:</label></td>
				<td><input name="lang"
					data-options="required:false,validType:'length[0,64]'"
					class="easyui-validatebox"></td>
				<td><label>使用货币:</label></td>
				<td><input name="currency"
					data-options="required:true,validType:'length[0,32]'"
					class="easyui-validatebox"></td>
			</tr>
			<tr class="fitem">
				<td><label>目的地经度:</label></td>
				<td><input name="lng" class="easyui-validatebox"
					required="required" validType="numberbox" /></td>
				<td><label>目的地纬度:</label></td>
				<td><input name="lat" class="easyui-validatebox"
					required="required" validType="numberbox" /></td>
			</tr>
			<tr class="fitem">
				<td><label>驻外大使馆电话:</label></td>
				<td><input name="tel"
					data-options="required:false,validType:'length[0,64]'"
					class="easyui-validatebox"></td>
				<td><label>目的地是否可用:</label></td>
				<td><select name="destEnable">
						<option value="1" selected="selected">可用</option>
						<option value="0">不可用</option>
				</select></td>
			</tr>
			<tr>
				<td><label>是否单独发布酒店:</label></td>
				<td><select name="hotelEnable">
						<option value="0" selected="selected">否</option>
						<option value="1">是</option>
				</select></td>
				<td>旅游局官网：</td>
				<td><input name="url" data-options="validType:'length[0,128]'"
					class="easyui-validatebox"></td>

			</tr>

			<tr>
				<td>航空：</td>
				<td><input name="aviation"
					data-options="validType:'length[0,64]'" class="easyui-validatebox">
				</td>
				<td>铁路：</td>
				<td><input name="railroad"
					data-options="validType:'length[0,64]'" class="easyui-validatebox">
				</td>

			</tr>
			<tr>
				<td>公路：</td>
				<td><input name="highway"
					data-options="validType:'length[0,64]'" class="easyui-validatebox">
				</td>
				<td>水运：</td>
				<td><input name="waterTransport"
					data-options="validType:'length[0,64]'" class="easyui-validatebox">
				</td>

			</tr>
			
			<tr>
				<td>市内交通：</td>
				<td><input name="localTransport"
					data-options="validType:'length[0,64]'" class="easyui-validatebox">
				</td>
				<td><label>显示风格:</label></td>
				<td><select name="style">
						<option value="1" selected="selected">分类展示</option>
						<option value="2">不分类展示</option>
				</select></td>

			</tr>
			<tr class="fitem">

				<td colspan="1"><label>目的地图片:</label>
				</td>
				<td colspan="3"><input name="imagepart" type="file" size="50"
					class="easyui-validatebox" style="width: 200px" required="true">
				</td>
			</tr>
			<tr>
				<td colspan="1"><label>描述摘要:</label>
				</td>
				<td colspan="3"><textarea name="summary" id="destSummary"
						data-options="required:false,validType:'length[0,64]'"
						class="easyui-validatebox" style="width: 375px; height: 80px"></textarea>
				</td>
			</tr>
			<tr>
				<td colspan="1"><label>目的地描述:</label>
				</td>
				<td colspan="3"><textarea name="content" id="destDesc"
						data-options="required:false,validType:'length[0,2048]'"
						class="easyui-validatebox" style="width: 375px; height: 80px"></textarea>
				</td>
				<input id="cName" name="countryName" type="hidden" />
			</tr>
		</table>

	</form>

	<script type="text/javascript">
		//初始化国家列表
		$('#countryId').combobox({
			url : '${cpath }/admin/dest/listCountry',
			valueField : 'countryId',
			textField : 'countryName',
			editable : false,
			onSelect: function(rec){
				//设置国家名称
				$("#cName").val(rec.countryName);
				 }
		});
		
		$('#destDesc').ceditor();
		$('#destSummary').ceditor();
		
	</script>
	<style type="text/css">
#fm {
	margin: 0;
	padding: 40px 40px;
}

.ftitle {
	font-size: 14px;
	font-weight: bold;
	padding: 5px 0;
	margin-bottom: 10px;
	border-bottom: 1px solid #ccc;
}

.fitem {
	margin-bottom: 5px;
}

.fitem label {
	display: inline-block;
	width: 90px;
}
</style>
</body>
</html>